package can_variable_parameter;

public class ChangeArgs {
	public static void main(String[] args) {
		int[] arr= {
				1,4,62,431,2
		};
		int sum=getSum(arr);
		System.out.println(sum);
		//int sum=getSum(6,7,2,12,2131);
	}
	
	
	public static int getSum(int ...arr) {
		int sum=0;
		for (int i : arr) {
			sum+=i;
		}
		return sum;
	}
}
